package Expe7;

import java.util.Scanner;

/**
 * @Author sy
 * @Date 2022/10/4
 */
public class T5 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输入第一个数：");
        int n1 = in.nextInt();
        System.out.println("请输入第二个数：");
        int n2 = in.nextInt();

        Number c = new Number(n1,n2);
        System.out.println("两数之和为："+c.addition());
        System.out.println("两数之差为："+c.subtration());
        System.out.println("两数之积为："+c.multiplication());
        System.out.println("两数之商为："+c.division());
    }
}
class Number{
    int n1;
    int n2;
    Number(int n1,int n2){
        this.n1=n1;
        this.n2=n2;
    }
    int addition(){
        return n1+n2;
    }
    int subtration(){
        return  n1-n2;
    }
    int multiplication(){
        return n1*n2;
    }
    double division(){
        return Double.valueOf(n1)/n2;
    }
}
